LeaveBillManagerForm = Ext.extend(Ext.Window, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        LeaveBillManagerForm.superclass.constructor.call(this, {
            layout : "fit",
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "流程配置信息", 
            iconCls : "menu-flowWait",
            width : 620,
            height : 350
        });
    },
    initUIComponents : function() {
        createyeargridform({
            operation : this,
            form : {
                saveUrl : __ctxPath + "/bpmndemo/saveLeaveBill.do",
                items : [ {
                    name : "leaveBill.id",
                    xtype : "hidden",
                    value : this.id == null ? "" : this.id
                },{
                    name : "leaveBill.status",
                    xtype : "hidden",
                    value : "1"
                },{
                    name : "leaveBill.userId",
                    xtype : "hidden",
                    value : __userid
                },{
                    name : "leaveBill.name",
                    xtype : "hidden",
                    value : __userfullname
                },
                {
                    layout : "column", // 第一行
                    bodyStyle : "padding:5px;",
                    items : [ {
                        columnWidth : .5,//第一行第1列
                        border : false,
                        layout : "form",
                        defaultType : "numberfield",
                        items : [ {
                            fieldLabel : '请假天数' + '<font color=red>*</font>',
                            name : "leaveBill.days",
                            maxLength : 80,
                            width : 146,
                            allowBlank : false,
                            value : this.processName,
                            blankText : "请假天数不能为空！"
                        } ]
                    }]
                },{
                    layout : "column",
                    bodyStyle : "padding:5px;",
                    items : [  {
                        layout : "form",
                        columnWidth : 1,
                        border : false,
                        items : [ {
                            xtype : "textarea",
                            fieldLabel : '请假原因',
                            name : "leaveBill.reason",
                            width : 448,
                            maxLength : 80,
                        } ]
                    }]
                }]
            },
            loadData : {
                getUrl : __ctxPath + "/bpmndemo/getLeaveBill.do",
                preName : "leaveBill"
            },
            //配置项意为双击打开后的form为只读
            isShow : this.isShow
        });
    }
});
